package com.jk.smartelderlycare.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jk.smartelderlycare.dto.SysPharm;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

public interface SysPharmMapper extends BaseMapper<SysPharm> {
    /**
     * @description: 药品列表后端分页查询
     * @param: [sysPharm, page]
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.jk.smartelderlycare.dto.SysPharm>
     * @author hhk
     * @date: 2024/11/7 18:51
     */
    IPage<SysPharm> findSysPharmPaginationList(@Param(value = "sysPharm") SysPharm sysPharm, Page<SysPharm> page);
    /**
     * @description: 状态修改
     * @param: [sysPharm]
     * @return: void
     * @author hhk
     * @date: 2024/11/7 18:59
     */
    @Delete(" update sys_pharm set  status = #{status} where pharm_id = #{pharmId} ")
    void updateStatusById(SysPharm sysPharm);
}